/**
 * Copyright &copy; 2015-2020 <a href="http://www.jeeplus.org/">JeePlus</a> All rights reserved.
 */
package com.jeeplus.modules.xiongda.service;

import java.util.List;

import com.jeeplus.modules.xiongda.dao.XCategoryDao;
import com.jeeplus.modules.xiongda.dao.XUserDao;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.jeeplus.common.persistence.Page;
import com.jeeplus.common.service.CrudService;
import com.jeeplus.modules.xiongda.entity.XBlog;
import com.jeeplus.modules.xiongda.dao.XBlogDao;

/**
 * 博客Service
 * @author 缪琼
 * @version 2017-11-29
 */
@Service
@Transactional(readOnly = true)
public class XBlogService extends CrudService<XBlogDao, XBlog> {

	@Autowired
	private XUserDao xUserDao;
	@Autowired
	private XCategoryDao xCategoryDao;

	public XBlog get(String id) {
		return super.get(id);
	}
	
	public List<XBlog> findList(XBlog xBlog) {
		return super.findList(xBlog);
	}
	
	public Page<XBlog> findPage(Page<XBlog> page, XBlog xBlog) {
		return super.findPage(page, xBlog);
	}
	
	@Transactional(readOnly = false)
	public void save(XBlog xBlog) {
		super.save(xBlog);
	}
	
	@Transactional(readOnly = false)
	public void delete(XBlog xBlog) {
		super.delete(xBlog);
	}

	public String findUser(String id) {
		return xUserDao.findUser(id);
	}

	public String findCategory(String id) {
		return xCategoryDao.findCategory(id);
	}
}